<template>
	<div>
		<el-row class="bg">
			<el-col :span="24">
				<el-form :inline="true" :model="dataForm" ref="dataForm" @keyup.enter.native="init()">
					<el-form-item label="站台侧">
						<el-select v-model="dataForm.stationSide" filterable placeholder="请选择" @change="getStationSide">
							<el-option v-for="item in options" :key="item.value" :label="item.label"
								:value="item.value"></el-option>
						</el-select>
					</el-form-item>
					<el-form-item label="门控单元编号：">
						<el-select v-model="dataForm.DCU" filterable clearable placeholder="请选择DCU编号" @change="changeDCU">
							<el-option v-for="item in DCUoptions" :key="item.dcu" :label="item.dcu" :value="item.dcu">
							</el-option>
						</el-select>
					</el-form-item>
					<!-- <el-form-item label="CPU：">
						<el-select v-model="dataForm.CPU" filterable clearable placeholder="请选择CPU">
							<el-option v-for="item in CPUoptions" :key="item.value" :label="item.label"
								:value="item.value">
							</el-option>
						</el-select>
					</el-form-item> -->
					<el-form-item>
						<el-button @click="init()" type="primary" class="search">搜索</el-button>
					</el-form-item>
					<el-form-item>
						<el-button type="info" class="reset" @click="reset">重置</el-button>
					</el-form-item>
				</el-form>
			</el-col>
		</el-row>
		<el-row class="bg1">
			<el-col :span="24">
				<h3 class="baseHeader" style="text-align: left;">DCU参数</h3>
				<div class="baseInfo">
					<div class="homeTuTxt">基础参数</div>
					<div class="baseInfoContent">
						<el-form :inline="true" :model="baseForm">
							<el-row>

								<!-- <div class="baseInfo1">
									<el-form-item label="遇阻开关门次数：">
										<el-input v-model="baseForm.openTimeLeft"
											oninput="value=value.replace(/[^\d]/g,'')" :readonly="DCUStatus"
											placeholder="" clearable
											style="width:7.8vw; height:3.5vh;min-height: 30px;"></el-input>
									</el-form-item>
									<el-form-item label="" v-if="type==1">
										<el-input v-model="baseForm.openTimeRight"
											oninput="value=value.replace(/[^\d]/g,'')" :readonly="DCUStatus"
											placeholder="" clearable
											style="width:7.8vw; height:3.5vh;min-height: 30px;"></el-input>
									</el-form-item>
									<span class="company">次</span>
								</div> -->

							</el-row>
							<!-- <el-row>
								<div class="baseInfo1">
									<el-form-item label="关门时间：">
										<el-input v-model="baseForm.closeTimeLeft"
											oninput="value=value.replace(/[^\d]/g,'')" :readonly="DCUStatus"
											placeholder="" clearable
											style="width:7.8vw; height:3.5vh;min-height: 30px;"></el-input>
									</el-form-item>
									<el-form-item v-if="type==1">
										<el-input v-model="baseForm.closeTimeRight"
											oninput="value=value.replace(/[^\d]/g,'')" :readonly="DCUStatus"
											placeholder="" clearable
											style="width:7.8vw; height:3.5vh;min-height: 30px;"></el-input>
									</el-form-item>
									<span class="company">s</span>
								</div>
								<div class="baseInfo1">
									<el-form-item label="开门时间：">
										<el-input v-model="baseForm.openTimeLeft"
											oninput="value=value.replace(/[^\d]/g,'')" :readonly="DCUStatus"
											placeholder="" clearable
											style="width:7.8vw; height:3.5vh;min-height: 30px;"></el-input>
									</el-form-item>
									<el-form-item label="" v-if="type==1">
										<el-input v-model="baseForm.openTimeRight"
											oninput="value=value.replace(/[^\d]/g,'')" :readonly="DCUStatus"
											placeholder="" clearable
											style="width:7.8vw; height:3.5vh;min-height: 30px;"></el-input>
									</el-form-item>
									<span class="company">s</span>
								</div>

							</el-row> -->
							<!-- <el-row>
								<div class="baseInfo1">
									<el-form-item label="慢关时间：">
										<el-input v-model="baseForm.slowCloseTimeLeft"
											oninput="value=value.replace(/[^\d]/g,'')" :readonly="DCUStatus"
											placeholder="" clearable
											style="width:7.8vw; height:3.5vh;min-height: 30px;"></el-input>
									</el-form-item>
									<el-form-item label="" v-if="type==1">
										<el-input v-model="baseForm.slowCloseTimeRight"
											oninput="value=value.replace(/[^\d]/g,'')" :readonly="DCUStatus"
											placeholder="" clearable
											style="width:7.8vw; height:3.5vh;min-height: 30px;"></el-input>
									</el-form-item>
									<span class="company">s</span>
								</div>
								<div class="baseInfo1">
									<el-form-item label="慢开时间：">
										<el-input v-model="baseForm.slowOpenTimeLeft"
											oninput="value=value.replace(/[^\d]/g,'')" :readonly="DCUStatus"
											placeholder="" clearable
											style="width:7.8vw; height:3.5vh;min-height: 30px;"></el-input>
									</el-form-item>
									<el-form-item label="" v-if="type==1">
										<el-input v-model="baseForm.slowOpenTimeRight"
											oninput="value=value.replace(/[^\d]/g,'')" :readonly="DCUStatus"
											placeholder="" clearable
											style="width:7.8vw; height:3.5vh;min-height: 30px;"></el-input>
									</el-form-item>
									<span class="company">s</span>
								</div>
							</el-row> -->
							<!-- <el-row>
								<div class="baseInfo1">
									<el-form-item label="关门刹车速度：">
										<el-input v-model="baseForm.closeBrakeSpeedLeft"
											oninput="value=value.replace(/[^\d]/g,'')" :readonly="DCUStatus"
											placeholder="" clearable
											style="width:7.8vw; height:3.5vh;min-height: 30px;"></el-input>
									</el-form-item>
									<el-form-item label="" v-if="type==1">
										<el-input v-model="baseForm.closeBrakeSpeedRight"
											oninput="value=value.replace(/[^\d]/g,'')" :readonly="DCUStatus"
											placeholder="" clearable
											style="width:7.8vw; height:3.5vh;min-height: 30px;"></el-input>
									</el-form-item>
									<span class="company">mm/s</span>
								</div>
								<div class="baseInfo1">
									<el-form-item label="开门刹车速度：">
										<el-input v-model="baseForm.openBrakeSpeedLeft"
											oninput="value=value.replace(/[^\d]/g,'')" :readonly="DCUStatus"
											placeholder="" clearable
											style="width:7.8vw; height:3.5vh;min-height: 30px;"></el-input>
									</el-form-item>
									<el-form-item label="" v-if="type==1">
										<el-input v-model="baseForm.openBrakeSpeedRight"
											oninput="value=value.replace(/[^\d]/g,'')" :readonly="DCUStatus"
											placeholder="" clearable
											style="width:7.8vw; height:3.5vh;min-height: 30px;"></el-input>
									</el-form-item>
									<span class="company">mm/s</span>
								</div>
							</el-row> -->
							<el-row>
								<div class="baseInfo1">
									<el-form-item label="左门机阻力：">
										<el-input v-model="baseForm.leftNowel" oninput="value=value.replace(/[^\d]/g,'')"
											:readonly="DCUStatus" placeholder="" clearable
											style="width:7.8vw; height:3.5vh;min-height: 30px;"></el-input>
									</el-form-item>
									<span class="company">N</span>
								</div>
								<div class="baseInfo1">
									<el-form-item label="右门机阻力：">
										<el-input v-model="baseForm.rightNowel" oninput="value=value.replace(/[^\d]/g,'')"
											:readonly="DCUStatus" placeholder="" clearable
											style="width:7.8vw; height:3.5vh;min-height: 30px;"></el-input>
									</el-form-item>
									<span class="company">N</span>
								</div>
							</el-row>
							<el-row>
								<div class="baseInfo1">
									<el-form-item label="关门到位撞击力：">
										<el-input v-model="baseForm.closeImpactLeft"
											oninput="value=value.replace(/[^\d]/g,'')" :readonly="DCUStatus" placeholder=""
											clearable style="width:7.8vw; height:3.5vh;min-height: 30px;"></el-input>
									</el-form-item>
									<el-form-item label="" v-if="type == 1">
										<el-input v-model="baseForm.closeImpactRight"
											oninput="value=value.replace(/[^\d]/g,'')" :readonly="DCUStatus" placeholder=""
											clearable style="width:7.8vw; height:3.5vh;min-height: 30px;"></el-input>
									</el-form-item>
									<span class="company">N</span>
								</div>
								<div class="baseInfo1">
									<el-form-item label="开门到位撞击力：">
										<el-input v-model="baseForm.openImpactLeft"
											oninput="value=value.replace(/[^\d]/g,'')" :readonly="DCUStatus" placeholder=""
											clearable style="width:7.8vw; height:3.5vh;min-height: 30px;"></el-input>
									</el-form-item>
									<el-form-item label="" v-if="type == 1">
										<el-input v-model="baseForm.openImpactRight"
											oninput="value=value.replace(/[^\d]/g,'')" :readonly="DCUStatus" placeholder=""
											clearable style="width:7.8vw; height:3.5vh;min-height: 30px;"></el-input>
									</el-form-item>
									<span class="company">N</span>
								</div>
							</el-row>
							<el-row>
								<div class="baseInfo1">
									<el-form-item label="遇障力：">
										<el-input v-model="baseForm.encounterNowelLeft"
											oninput="value=value.replace(/[^\d]/g,'')" :readonly="DCUStatus" placeholder=""
											clearable style="width:7.8vw; height:3.5vh;min-height: 30px;"></el-input>
									</el-form-item>
									<el-form-item label="" v-if="type == 1">
										<el-input v-model="baseForm.encounterNowelRight"
											oninput="value=value.replace(/[^\d]/g,'')" :readonly="DCUStatus" placeholder=""
											clearable style="width:7.8vw; height:3.5vh;min-height: 30px;"></el-input>
									</el-form-item>
									<span class="company">N</span>
								</div>
								<div class="baseInfo1">
									<el-form-item label="遇障回退距离：">
										<el-input v-model="baseForm.encounterRegressionDistanceLeft"
											oninput="value=value.replace(/[^\d]/g,'')" :readonly="DCUStatus" placeholder=""
											clearable style="width:7.8vw; height:3.5vh;min-height: 30px;"></el-input>
									</el-form-item>
									<el-form-item label="" v-if="type == 1">
										<el-input v-model="baseForm.encounterRegressionDistanceRight"
											oninput="value=value.replace(/[^\d]/g,'')" :readonly="DCUStatus" placeholder=""
											clearable style="width:7.8vw; height:3.5vh;min-height: 30px;"></el-input>
									</el-form-item>
									<span class="company">mm</span>
								</div>
							</el-row>
							<!-- <el-row>
								<div class="baseInfo1">
									<el-form-item label="关门加速加速度：">
										<el-input v-model="baseForm.closeAccelerationLeft" :readonly="DCUStatus"
											oninput="value=value.replace(/[^\d]/g,'')" placeholder="" clearable
											style="width:7.8vw; height:3.5vh;min-height: 30px;"></el-input>
									</el-form-item>
									<el-form-item label="" v-if="type==1">
										<el-input v-model="baseForm.closeAccelerationRight" :readonly="DCUStatus"
											oninput="value=value.replace(/[^\d]/g,'')" placeholder="" clearable
											style="width:7.8vw; height:3.5vh;min-height: 30px;"></el-input>
									</el-form-item>
									<span class="company">mm/s</span>
								</div>
								<div class="baseInfo1">
									<el-form-item label="开门加速加速度：">
										<el-input v-model="baseForm.openAccelerationLeft" :readonly="DCUStatus"
											oninput="value=value.replace(/[^\d]/g,'')" placeholder="" clearable
											style="width:7.8vw; height:3.5vh;min-height: 30px;"></el-input>
									</el-form-item>
									<el-form-item label="" v-if="type==1">
										<el-input v-model="baseForm.openAccelerationRight" :readonly="DCUStatus"
											oninput="value=value.replace(/[^\d]/g,'')" placeholder="" clearable
											style="width:7.8vw; height:3.5vh;min-height: 30px;"></el-input>
									</el-form-item>
									<span class="company">mm/s</span>
								</div>

							</el-row> -->
							<!-- <el-row>
								<div class="baseInfo1">
									<el-form-item label="关门匀速度：">
										<el-input v-model="baseForm.closeUniformSpeedLeft" :readonly="DCUStatus"
											oninput="value=value.replace(/[^\d]/g,'')" placeholder="" clearable
											style="width:7.8vw; height:3.5vh;min-height: 30px;"></el-input>
									</el-form-item>
									<el-form-item label="" v-if="type==1">
										<el-input v-model="baseForm.closeUniformSpeedRight" :readonly="DCUStatus"
											oninput="value=value.replace(/[^\d]/g,'')" placeholder="" clearable
											style="width:7.8vw; height:3.5vh;min-height: 30px;"></el-input>
									</el-form-item>
									<span class="company">mm/s</span>
								</div>
								<div class="baseInfo1">
									<el-form-item label="开门匀速度：">
										<el-input v-model="baseForm.openUniformSpeedLeft" :readonly="DCUStatus"
											oninput="value=value.replace(/[^\d]/g,'')" placeholder="" clearable
											style="width:7.8vw; height:3.5vh;min-height: 30px;"></el-input>
									</el-form-item>
									<el-form-item label="" v-if="type==1">
										<el-input v-model="baseForm.openUniformSpeedRight" :readonly="DCUStatus"
											oninput="value=value.replace(/[^\d]/g,'')" placeholder="" clearable
											style="width:7.8vw; height:3.5vh;min-height: 30px;"></el-input>
									</el-form-item>
									<span class="company">mm/s</span>
								</div>
							</el-row> -->
							<!-- <el-row>
								<div class="baseInfo1">
									<el-form-item label="关门减速加速度：">
										<el-input v-model="baseForm.closeDeAcLeft" :readonly="DCUStatus"
											oninput="value=value.replace(/[^\d]/g,'')" placeholder="" clearable
											style="width:7.8vw; height:3.5vh;min-height: 30px;"></el-input>
									</el-form-item>
									<el-form-item label="" v-if="type==1">
										<el-input v-model="baseForm.closeDeAcRight" :readonly="DCUStatus"
											oninput="value=value.replace(/[^\d]/g,'')" placeholder="" clearable
											style="width:7.8vw; height:3.5vh"></el-input>
									</el-form-item>
									<span class="company">mm/s</span>
								</div>
								<div class="baseInfo1">
									<el-form-item label="开门减速加速度：">
										<el-input v-model="baseForm.openDeAcLeft" :readonly="DCUStatus"
											oninput="value=value.replace(/[^\d]/g,'')" placeholder="" clearable
											style="width:7.8vw; height:3.5vh"></el-input>
									</el-form-item>
									<el-form-item label="" v-if="type==1">
										<el-input v-model="baseForm.openDeAcRight" :readonly="DCUStatus"
											oninput="value=value.replace(/[^\d]/g,'')" placeholder="" clearable
											style="width:7.8vw; height:3.5vh"></el-input>
									</el-form-item>
									<span class="company">mm/s</span>
								</div>
							</el-row> -->
							<el-row>
								<div class="baseInfo1">
									<el-form-item label="关门遇障次数：">
										<el-input v-model="baseForm.closeEncounterNumLeft" :readonly="DCUStatus"
											oninput="value=value.replace(/[^\d]/g,'')" placeholder="" clearable
											style="width:7.8vw; height:3.5vh;min-height: 30px;"></el-input>
									</el-form-item>
									<el-form-item label="" v-if="type == 1">
										<el-input v-model="baseForm.closeEncounterNumRight" :readonly="DCUStatus"
											oninput="value=value.replace(/[^\d]/g,'')" placeholder="" clearable
											style="width:7.8vw; height:3.5vh;min-height: 30px;"></el-input>
									</el-form-item>
									<span class="company">次</span>
								</div>
								<div class="baseInfo1">
									<el-form-item label="开门遇障次数：">
										<el-input v-model="baseForm.openEncounterNumLeft" :readonly="DCUStatus"
											oninput="value=value.replace(/[^\d]/g,'')" placeholder="" clearable
											style="width:7.8vw; height:3.5vh;min-height: 30px;"></el-input>
									</el-form-item>
									<el-form-item label="" v-if="type == 1">
										<el-input v-model="baseForm.openEncounterNumRight" :readonly="DCUStatus"
											oninput="value=value.replace(/[^\d]/g,'')" placeholder="" clearable
											style="width:7.8vw; height:3.5vh;min-height: 30px;"></el-input>
									</el-form-item>
									<span class="company">次</span>
								</div>
							</el-row>
							<el-row>
								<div class="baseInfo1">
									<el-form-item label="关门遇障等待时间：">
										<el-input v-model="baseForm.closeEncounterTimeLeft" :readonly="DCUStatus"
											oninput="value=value.replace(/[^\d]/g,'')" placeholder="" clearable
											style="width:7.8vw; height:3.5vh;min-height: 30px;"></el-input>
									</el-form-item>
									<el-form-item label="" v-if="type == 1">
										<el-input v-model="baseForm.closeEncounterTimeRight" :readonly="DCUStatus"
											oninput="value=value.replace(/[^\d]/g,'')" placeholder="" clearable
											style="width:7.8vw; height:3.5vh;min-height: 30px;"></el-input>
									</el-form-item>
									<span class="company">s</span>
								</div>
								<div class="baseInfo1">
									<el-form-item label="开门遇障等待时间：">
										<el-input v-model="baseForm.openEncounterTimeLeft" :readonly="DCUStatus"
											oninput="value=value.replace(/[^\d]/g,'')" placeholder="" clearable
											style="width:7.8vw; height:3.5vh;min-height: 30px;"></el-input>
									</el-form-item>
									<el-form-item label="" v-if="type == 1">
										<el-input v-model="baseForm.openEncounterTimeRight" :readonly="DCUStatus"
											oninput="value=value.replace(/[^\d]/g,'')" placeholder="" clearable
											style="width:7.8vw; height:3.5vh;min-height: 30px;"></el-input>
									</el-form-item>
									<span class="company">s</span>
								</div>
							</el-row>
							<el-row>
								<div class="baseInfo1">
									<!-- <el-form-item label="蜂鸣器音量：">
										<el-input v-model="baseForm.buzzerVolumeLeft" :readonly="DCUStatus"
											oninput="value=value.replace(/[^\d]/g,'')" placeholder="" clearable
											style="width:7.8vw; height:3.5vh;min-height: 30px;"></el-input>
									</el-form-item>
									<el-form-item label="" v-if="type==1">
										<el-input v-model="baseForm.buzzerVolumeRight" :readonly="DCUStatus"
											oninput="value=value.replace(/[^\d]/g,'')" placeholder="" clearable
											style="width:7.8vw; height:3.5vh;min-height: 30px;"></el-input>
									</el-form-item> -->
									<el-form-item label="蜂鸣器音量：">
										<el-input v-model="baseForm.buzzerVolume" :readonly="DCUStatus"
											oninput="value=value.replace(/[^\d]/g,'')" placeholder="" clearable
											style="width:7.8vw; height:3.5vh;min-height: 30px;"></el-input>
									</el-form-item>
									<span class="company">档位</span>
								</div>
								<!-- <div class="baseInfo1">
									<el-form-item label="吸锁时间限制：">
										<el-input v-model="baseForm.lockTimeLeft" :readonly="DCUStatus"
											oninput="value=value.replace(/[^\d]/g,'')" placeholder="" clearable
											style="width:7.8vw; height:3.5vh;min-height: 30px;"></el-input>
									</el-form-item>
									<el-form-item label="" v-if="type==1">
										<el-input v-model="baseForm.lockTimeRight" :readonly="DCUStatus"
											oninput="value=value.replace(/[^\d]/g,'')" placeholder="" clearable
											style="width:7.8vw; height:3.5vh;min-height: 30px;"></el-input>
									</el-form-item>
									<span class="company">s</span>
								</div> -->
								<!-- <div class="baseInfo1" style="justify-content: center;">
									<div class="baseInfoBtn baseInfoBtnRight" style="flex-direction: inherit;position: relative;right: 0;top: 0;width: auto;height: auto;">
										<el-button class="baseInfoBtn2" type="primary">写DCU</el-button>
										<el-button class="baseInfoBtn3" type="primary">升级DCU</el-button>
										<el-button class="baseInfoBtn4" type="primary">默认</el-button>
									</div>
								</div> -->
							</el-row>
							<el-row>
								<div class="baseInfo1">
									<el-form-item label="手解重关时间：">
										<el-input v-model="baseForm.macloseTimeLeft" :readonly="DCUStatus"
											oninput="value=value.replace(/[^\d]/g,'')" placeholder="" clearable
											style="width:7.8vw; height:3.5vh"></el-input>
									</el-form-item>
									<el-form-item label="" v-if="type == 1">
										<el-input v-model="baseForm.macloseTimeRigth" :readonly="DCUStatus"
											oninput="value=value.replace(/[^\d]/g,'')" placeholder="" clearable
											style="width:7.8vw; height:3.5vh"></el-input>
									</el-form-item>
									<span class="company">s</span>
								</div>
								<!-- <div class="baseInfo1">
									<el-form-item label="生产日期-年：">
										<el-input v-model="baseForm.year" :readonly="true" placeholder="" clearable
											style="width:7.8vw; height:3.5vh"></el-input>
									</el-form-item>
								</div> -->
							</el-row>
							<el-row>
								<div class="baseInfo1">
									<el-form-item label="过流保护阈值：">
										<el-input v-model="baseForm.overProThreLeft" :readonly="DCUStatus" placeholder=""
											clearable style="width:7.8vw; height:3.5vh"></el-input>
									</el-form-item>
									<el-form-item label="" v-if="type == 1">
										<el-input v-model="baseForm.overProThreRight" :readonly="DCUStatus" placeholder=""
											clearable style="width:7.8vw; height:3.5vh"></el-input>
									</el-form-item>
									<span class="company">A</span>
								</div>
								<!-- <div class="baseInfo1">
									<el-form-item label="生产日期-月：">
										<el-input v-model="baseForm.month" :readonly="true" placeholder="" clearable
											style="width:7.8vw; height:3.5vh"></el-input>
									</el-form-item>
								</div> -->
							</el-row>
							<el-row>
								<div class="baseInfo1">
									<el-form-item label="端门报警时间：">
										<el-input v-model="baseForm.dmWarnTimeLeft" :readonly="DCUStatus" placeholder=""
											clearable style="width:7.8vw; height:3.5vh"></el-input>
									</el-form-item>
									<el-form-item label="" v-if="type == 1">
										<el-input v-model="baseForm.dmWarnTimeRight" :readonly="DCUStatus" placeholder=""
											clearable style="width:7.8vw; height:3.5vh"></el-input>
									</el-form-item>
									<span class="company">s</span>
								</div>
								<!-- <div class="baseInfo1">
									<el-form-item label="生产日期-日：">
										<el-input v-model="baseForm.day" :readonly="true" placeholder="" clearable
											style="width:7.8vw; height:3.5vh"></el-input>
									</el-form-item>
								</div> -->
							</el-row>
							<el-row style="position: relative;">
								<div class="baseInfo1" style="opacity: 0;">
									<el-form-item label="自学习：">
										<el-checkbox v-model="baseForm.checked"></el-checkbox>
									</el-form-item>
								</div>
								<div class="baseInfo1" style="justify-content: end; position: absolute;right: 0px;">
									<div class="baseInfoBtn baseInfoBtnRight"
										style="flex-direction: inherit;position: relative;right: 0;top: 0;width: auto;height: auto;">
										<el-button class="baseInfoBtn2" type="primary" @click="whiteDCU">写DCU
										</el-button>
										<el-button class="baseInfoBtn3" type="primary" @click="save">保存</el-button>
										<!-- <el-button class="baseInfoBtn3" type="primary">升级DCU</el-button> -->
										<!-- <el-button class="baseInfoBtn4" type="primary" @click="MRDCU">默认</el-button> -->
										<!-- <el-button class="baseInfoBtn5" type="primary" @click="history">加载</el-button> -->
									</div>
								</div>
							</el-row>
						</el-form>
					</div>
				</div>
				<div class="baseInfo baseInfozd">
					<div class="homeTuTxt">只读参数</div>
					<div class="baseInfoContent">
						<el-form :inline="true" :model="baseForm">

							<el-row v-if="type == 1">
								<div class="baseInfo1 baseInfo2">
									<div>左</div>
									<div>右</div>
								</div>
								<div class="baseInfo1 baseInfo2">
									<div>左</div>
									<div>右</div>
								</div>
							</el-row>
							<el-row v-if="type == 0"></el-row>
							<el-row>
								<div class="baseInfo1">
									<el-form-item v-if="type == 0" label="软件版本号：">
										<el-input v-model="baseForm.version" :readonly="true" placeholder="" clearable
											style="width:7.8vw; height:3.5vh"></el-input>
									</el-form-item>
									<el-form-item v-if="type == 1" label="软件版本号：">
										<el-input v-model="baseForm.version" :readonly="true" placeholder="" clearable
											style="width:16vw; height:3.5vh"></el-input>
									</el-form-item>
								</div>
								<!-- <div class="baseInfo1">
									<el-form-item label="上次解锁等待时间：" :class="leftStatus?'leftColor':''">
										<el-input v-model="baseForm.beforeUnlockTimeLeft" :readonly="true"
											placeholder="" clearable style="width:7.8vw; height:3.5vh"></el-input>
									</el-form-item>
									<el-form-item label="" v-if="type==1" :class="rightStatus?'leftColor':''">
										<el-input v-model="baseForm.beforeUnlockTimeRight" :readonly="true"
											placeholder="" clearable style="width:7.8vw; height:3.5vh"></el-input>
									</el-form-item>
									<span class="danwei">(ms)</span>
								</div> -->

							</el-row>
							<!-- <el-row>
								<div class="baseInfo1">
									<el-form-item label="上次关门时间：" :class="leftStatus?'leftColor':''">
										<el-input v-model="baseForm.beforeCloseTimeLeft" :readonly="true" placeholder=""
											clearable style="width:7.8vw; height:3.5vh"></el-input>
									</el-form-item>
									<el-form-item label="" v-if="type==1" :class="rightStatus?'leftColor':''">
										<el-input v-model="baseForm.beforeCloseTimeRight" :readonly="true"
											placeholder="" clearable style="width:7.8vw; height:3.5vh"></el-input>
									</el-form-item>
									<span class="danwei">(ms)</span>
								</div>
								<div class="baseInfo1">
									<el-form-item label="上次开门时间：" :class="leftStatus?'leftColor':''">
										<el-input v-model="baseForm.beforeOpenTimeLeft" :readonly="true" placeholder=""
											clearable style="width:7.8vw; height:3.5vh"></el-input>
									</el-form-item>
									<el-form-item label="" v-if="type==1" :class="rightStatus?'leftColor':''">
										<el-input v-model="baseForm.beforeOpenTimeRight" :readonly="true" placeholder=""
											clearable style="width:7.8vw; height:3.5vh"></el-input>
									</el-form-item>
									<span class="danwei">(ms)</span>
								</div>
							</el-row> -->
							<el-row>
								<div class="baseInfo1">
									<el-form-item label="上电累计开门次数：" :class="leftStatus ? 'leftColor' : ''">
										<el-input v-model="baseForm.openNumLeft" :readonly="true" placeholder="" clearable
											style="width:7.8vw; height:3.5vh"></el-input>
									</el-form-item>
									<el-form-item label="" v-if="type == 1" :class="rightStatus ? 'leftColor' : ''">
										<el-input v-model="baseForm.openNumRight" :readonly="true" placeholder="" clearable
											style="width:7.8vw; height:3.5vh"></el-input>
									</el-form-item>
								</div>
								<div class="baseInfo1">
									<el-form-item label="上电累计运行小时：" :class="leftStatus ? 'leftColor' : ''">
										<el-input v-model="baseForm.runningHourLeft" :readonly="true" placeholder=""
											clearable style="width:7.8vw; height:3.5vh"></el-input>
									</el-form-item>
									<el-form-item label="" v-if="type == 1" :class="rightStatus ? 'leftColor' : ''">
										<el-input v-model="baseForm.runningHourRight" :readonly="true" placeholder=""
											clearable style="width:7.8vw; height:3.5vh"></el-input>
									</el-form-item>
								</div>
							</el-row>
							<el-row>
								<div class="baseInfo1">
									<el-form-item label="上电累计遇阻次数：" :class="leftStatus ? 'leftColor' : ''">
										<el-input v-model="baseForm.encounterNumLeft" :readonly="true" placeholder=""
											clearable style="width:7.8vw; height:3.5vh"></el-input>
									</el-form-item>
									<el-form-item label="" v-if="type == 1" :class="rightStatus ? 'leftColor' : ''">
										<el-input v-model="baseForm.encounterNumRight" :readonly="true" placeholder=""
											clearable style="width:7.8vw; height:3.5vh"></el-input>
									</el-form-item>
								</div>
								<div class="baseInfo1">
									<el-form-item label="上电累计启动次数：" :class="leftStatus ? 'leftColor' : ''">
										<el-input v-model="baseForm.startNumLeft" :readonly="true" placeholder="" clearable
											style="width:7.8vw; height:3.5vh"></el-input>
									</el-form-item>
									<el-form-item label="" v-if="type == 1" :class="rightStatus ? 'leftColor' : ''">
										<el-input v-model="baseForm.startNumRight" :readonly="true" placeholder="" clearable
											style="width:7.8vw; height:3.5vh"></el-input>
									</el-form-item>
								</div>
							</el-row>
							<el-row>
								<div class="baseInfo1">
									<el-form-item label="生产日期-年：">
										<el-input v-model="baseForm.year" :readonly="true" placeholder="" clearable
											style="width:7.8vw; height:3.5vh"></el-input>
									</el-form-item>
								</div>
								<div class="baseInfo1">
									<el-form-item label="生产日期-月：">
										<el-input v-model="baseForm.month" :readonly="true" placeholder="" clearable
											style="width:7.8vw; height:3.5vh"></el-input>
									</el-form-item>
								</div>
							</el-row>
							<el-row>
								<div class="baseInfo1">
									<el-form-item label="生产日期-日：">
										<el-input v-model="baseForm.day" :readonly="true" placeholder="" clearable
											style="width:7.8vw; height:3.5vh"></el-input>
									</el-form-item>
								</div>
							</el-row>
							<el-row class="baseInfoBtnAll" style="position: relative;top: -12px;">
								<div class="baseInfoBtn">
									<el-button type="primary" v-if="type == 1" @click="leftDCU">单独读左</el-button>
									<el-button type="primary" v-if="type == 1" @click="rightDCU">单独读右</el-button>
									<el-button class="baseInfoBtn1" v-if="type == 0" type="primary" @click="readDCU">读DCU
									</el-button>
								</div>
							</el-row>
							<!-- <el-row class="baseInfoBtnAll baseInfoBtnRight">
								<div class="baseInfoBtn">
									<el-button class="baseInfoBtn1" v-if="type==0" type="primary">读DCU</el-button>
									<el-button class="baseInfoBtn2" type="primary">写DCU</el-button>
									<el-button class="baseInfoBtn3" type="primary">升级DCU</el-button>
									<el-button class="baseInfoBtn4" type="primary">默认</el-button>
								</div>
							</el-row> -->
						</el-form>
					</div>
				</div>
			</el-col>
		</el-row>
		<el-row class="bg2">
			<el-col :span="24" style="height: 100%;">
				<h3 class="baseHeader" style="text-align: left;">开关门速度曲线及动能曲线实时参数</h3>
				<div class="baseInfoEcharts" @dblclick="echarts()">
					<div id="baseEcharts" style="width: 100%;height: 100%;"></div>
				</div>
			</el-col>
		</el-row>
		<!-- <add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="init" @getHistory="getHistory">
		</add-or-update> -->
		<!-- <save-or-update v-if="saveOrUpdateVisible" ref="saveOrUpdate" @refreshDataList="init"></save-or-update> -->
		<oper-data v-if="operdataVisible" ref="operdataFrom" @refreshDataList="init"></oper-data>
		<!-- <el-row class="bg2 bg3">
			<el-col :span="24">
				<h3 class="baseHeader" style="text-align: left;">PEDC参数</h3>
				<div class="PEDCInfo">
					<el-form :inline="true" :model="PEDCForm">
						<el-form-item label="最大关门时间：">
						 <el-input v-model="baseForm.leftparameter" placeholder="" clearable style="width:7.8vw; height:3.5vh"></el-input>
						  <span class="danwei">(0-20s)</span>
						</el-form-item>
						<el-form-item label="测试开门持续时间：">
						 <el-input v-model="baseForm.leftparameter" placeholder="" clearable style="width:7.8vw; height:3.5vh"></el-input>
						  <span class="danwei">(0-20s)</span>
						</el-form-item>
						<el-form-item label="端门报警时间设定：">
						 <el-input v-model="baseForm.leftparameter" placeholder="" clearable style="width:7.8vw; height:3.5vh"></el-input>
						  <span class="danwei">(0-20s)</span>
						</el-form-item>
						<el-form-item label="最大开门时间：">
						 <el-input v-model="baseForm.leftparameter" placeholder="" clearable style="width:7.8vw; height:3.5vh"></el-input>
						  <span class="danwei">(0-20s)</span>
						</el-form-item>
						<el-form-item label="测试关门持续时间：">
						 <el-input v-model="baseForm.leftparameter" placeholder="" clearable style="width:7.8vw; height:3.5vh"></el-input>
						  <span class="danwei">(0-20s)</span>
						</el-form-item>
					</el-form>
					
				</div>
				<el-row class="baseInfoBtnAll PEDCBtn">
					<div class="baseInfoBtn">
						<el-button class="baseInfoBtn1" type="primary">读PEDC</el-button>
						<el-button class="baseInfoBtn2" type="primary">写PEDC</el-button>
					</div>
				</el-row>
			</el-col>
		</el-row> -->
	</div>
</template>

<script>
import * as echarts from 'echarts';
import utils from '@/utils/utils'
import Cookies from 'js-cookie'
import AddOrUpdate from './oper-add-or-update.vue'
import SaveOrUpdate from './save-or-update.vue'
import operData from './oper-data.vue'
export default {
	components: {
		AddOrUpdate,
		SaveOrUpdate,
		operData
	},
	data() {
		return {
			dataForm: {
				stationSide: 1,
				DCU: '',
				CPU: '',
			},
			options: utils.StationList,
			DCUoptions: [],
			CPUoptions: utils.cpuType,
			DCUStatus: true,
			baseForm: {
				leftNowel: '', //门机阻力
				rightNowel: '', //门机阻力
				closeTimeLeft: '', //关门时间
				closeTimeRight: '', //关门时间
				openTimeLeft: '', //开门时间
				openTimeRight: '', //开门时间
				slowCloseTimeLeft: '', //慢关时间
				slowCloseTimeRight: '', //慢关时间
				slowOpenTimeLeft: '', //慢开时间
				slowOpenTimeRight: '', //慢开时间
				// closeBrakeSpeedLeft: '', //关门刹车速度
				// closeBrakeSpeedRight: '', //关门刹车速度
				// openBrakeSpeedLeft: '', //开门刹车速度
				// openBrakeSpeedRight: '', //开门刹车速度
				closeImpactLeft: '', //关门到位撞击力
				closeImpactRight: '', //关门到位撞击力
				openImpactLeft: '', //开门到位撞击力
				openImpactRight: '', //开门到位撞击力
				encounterNowelLeft: '', //遇障力
				encounterNowelRight: '', //遇障力
				encounterRegressionDistanceLeft: '', //遇障回退距离
				encounterRegressionDistanceRight: '', //遇障回退距离
				// closeAccelerationLeft: '', //关门加速加速度
				// closeAccelerationRight: '', //关门加速加速度
				// openAccelerationLeft: '', //开门加速加速度
				// openAccelerationRight: '', //开门加速加速度
				// closeUniformSpeedLeft: '', //关门匀速度
				// closeUniformSpeedRight: '', //关门匀速度
				// openUniformSpeedLeft: '', //开门匀速度
				// openUniformSpeedRight: '', //开门匀速度
				// closeDeAcLeft: '', //关门减速加速度
				// closeDeAcRight: '', //关门减速加速度
				// openDeAcLeft: '', //开门减速加速度
				// openDeAcRight: '', //开门减速加速度
				closeEncounterNumLeft: '', //关门遇障次数
				closeEncounterNumRight: '', //关门遇障次数
				openEncounterNumLeft: '', //开门遇障次数
				openEncounterNumRight: '', //开门遇障次数
				closeEncounterTimeLeft: '', //关门遇障等待时间
				closeEncounterTimeRight: '', //关门遇障等待时间
				openEncounterTimeLeft: '', //开门遇障等待时间
				openEncounterTimeRight: '', //开门遇障等待时间
				buzzerVolumeLeft: '', //蜂鸣器音量
				buzzerVolumeRight: '', //蜂鸣器音量
				buzzerVolume: '',//蜂鸣器音量
				lockTimeLeft: '', //吸锁时间限制
				lockTimeRight: '', //吸锁时间限制
				macloseTimeLeft: '', //手解重关时间
				macloseTimeRigth: '', //手解重关时间
				year: '', //生产日期-年
				overProThreLeft: '', //过流保护阈值
				overProThreRight: '', //过流保护阈值
				month: '', //生产日期-月
				dmWarnTimeLeft: '', //端门报警时间
				dmWarnTimeRight: '', //端门报警时间
				day: '', //生产日期-日
				checked: false, //自学习
				version: '', //版本号
				beforeUnlockTimeLeft: '', //上次解锁等待时间
				beforeUnlockTimeRight: '', //上次解锁等待时间
				beforeCloseTimeLeft: '', //上次传关门时间
				beforeCloseTimeRight: '', //上次传关门时间
				beforeOpenTimeLeft: '', //上次开门时间
				beforeOpenTimeRight: '', //上次开门时间
				openNumLeft: '', //上电累计开门次数
				openNumRight: '', //上电累计开门次数
				runningHourLeft: '', //上电累计运行小时
				runningHourRight: '', //上电累计运行小时
				encounterNumLeft: '', //上电累计遇阻次数
				encounterNumRight: '', //上电累计遇阻次数
				startNumLeft: '', //上电累计启动次数
				startNumRight: '', //上电累计启动次数
			},
			PEDCForm: {

			},
			type: Cookies.get('type'),
			leftStatus: false,
			rightStatus: false,
			num: 0,
			dataX: [],
			dataY: [],
			dataYD: [],
			addOrUpdateVisible: false,
			saveOrUpdateVisible: false, //名字保存
			operdataVisible: false,
		}
	},
	activated() {
		this.init()
		this.getSeconds()
	},
	methods: {
		changeDCU() {
			this.init()
		},
		getStationSide() {
			this.dataForm.DCU = ''
			this.getdoorList()
		},
		//接收websocket数据
		handleMsg() {
			this.$globalWebSocket.ws1.send("DCU");
			this.$globalWebSocket.ws1.onmessage = this.getMessage
		},
		//获取websocket数据
		getMessage(e) {
			var message = JSON.parse(e.data)
			if (message.sysDcuState.dcu == Number(this.dataForm.DCU)) {
				//获取基础参数和只读参数
				this.getData(message.dcuParametersDTO, message.sysDcuState)
				this.baseForm.version = message.sysDcuState.version
				//速度曲线
				this.dataY.push(message.dcuParametersDTO.v1, message.dcuParametersDTO.v2, message.dcuParametersDTO.v3, message.dcuParametersDTO.v4,
					message.dcuParametersDTO.v5, message.dcuParametersDTO.v6, message.dcuParametersDTO.v7)
				this.dataYD.push(message.dcuParametersDTO.ek1, message.dcuParametersDTO.ek2, message.dcuParametersDTO.ek3, message.dcuParametersDTO
					.ek4, message.dcuParametersDTO.ek5, message.dcuParametersDTO.ek6, message.dcuParametersDTO.ek7)

				// 解析曲线的横坐标
				var x = message.dcuParametersDTO.dcuCurrentTimeMillis
				for (var i = 1; i < 8; i++) {
					this.dataX.push(this.getnewSeconds(x, message.dcuParametersDTO['t' + `${i}`]))
				}
				// var x = this.getSeconds(message.dcuParametersDTO.dcuCurrentTimeMillis,message.dcuParametersDTO.openTimeLeft,message.dcuParametersDTO.openTimeRight)
				// for(var i=0;i<7;i++){
				// 	if(message.dcuParametersDTO.doorStatus==1){
				// 		// var avr = message.dcuParametersDTO.openTimeLeft * 1000 / 4 //分割四个点

				// 	    // this.dataX.push(this.getnewSeconds(x,i*avr))
				// 	}	
				// 	if(message.dcuParametersDTO.doorStatus==0){
				// 		// var avr = message.dcuParametersDTO.openTimeRight * 1000 / 4
				// 		this.dataX.push(this.getnewSeconds(x,i*avr))
				// 	}
				// }
			} else {
				this.dataY.push(0, 0, 0, 0, 0)
				this.dataYD.push(0, 0, 0, 0, 0)
			}
			this.initEcharts();
		},
		//根据时间戳和秒相加得到最新的时间戳
		getSeconds(val, openTime, closeTime) {
			if (openTime) {
				var t = new Date(val).setSeconds(new Date(val).getSeconds() - openTime);
			}
			if (closeTime) {
				var t = new Date(val).setSeconds(new Date(val).getSeconds() - openTime);
			}
			return this.filterTime(t)
		},
		// 新增毫秒相加
		getnewSeconds(val, tep) {
			// var newTime = new Date(val).getTime() + tep
			var newTime = new Date(val).setSeconds((new Date(val).getSeconds() * 1000 + tep * 1000) / 1000) //根据时间戳和秒相加得到最新的时间戳)
			return this.filterTime1(newTime)
		},
		init() {
			//获取门的信息
			var p0 = new Promise((resolve, reject) => {
				this.getdoorList(() => {
					resolve()
				})
			})
			Promise.all([p0]).then(() => {
				this.num = 0;
				this.dataX = [0]
				this.dataY = [0]
				this.dataYD = [0]
				this.handleMsg();
				this.getDCUCS()
				// this.initEcharts()
			})
		},
		//DCU编号数组
		getdoorList(callback) {
			this.DCUoptions = []
			this.$http.get('/psc/door/getDoor').then(res => {
				this.DCUoptions = []
				if (this.dataForm.stationSide == 1) {
					res.data.data.up.forEach(item => {
						if (item.doorType == 1) {
							this.DCUoptions.push(item)
							if (!this.dataForm.DCU) {
								this.dataForm.DCU = this.DCUoptions[0].dcu
							}
						}
					})
					if (callback) {
						callback()
					}

				} else {
					res.data.data.down.forEach(item => {
						if (item.doorType == 1) {
							this.DCUoptions.push(item)
							if (!this.dataForm.DCU) {
								this.dataForm.DCU = this.DCUoptions[0].dcu
							}
						}
					})
					if (callback) {
						callback()
					}
				}
			})


		},
		//写DCU
		whiteDCU() {
			this.operdataVisible = true
			this.$nextTick(() => {
				var obj = {
					DCU: this.dataForm.DCU,
					...this.baseForm
				}
				this.$refs.operdataFrom.init(obj, 0)
			})
		},
		//默认DCU恢复初始值
		MRDCU() {
			this.DCUStatus = true
			//恢复默认数据
			this.getDCUCS()
		},
		//单独读左
		leftDCU() {
			this.leftStatus = false
			this.rightStatus = true
		},
		//单独读右
		rightDCU() {
			this.leftStatus = true
			this.rightStatus = false
		},
		//保存
		save() {
			this.operdataVisible = true
			this.$nextTick(() => {
				var obj = {
					DCU: this.dataForm.DCU,
					...this.baseForm
				}
				this.$refs.operdataFrom.init(obj, 1)
			})
		},
		//读DCU
		readDCU() {
			//读取DCU开启推送
			// window.location.reload();
			// this.init()
			this.getDCUCS()
		},
		//获取保存的历史数据
		history() {
			this.addOrUpdateVisible = true
			this.$nextTick(() => {
				this.$refs.addOrUpdate.init()
			})
		},
		//获取DCU初始值
		getDCUCS() {
			this.$http.get('/psc/dcu/readCurrentDcu', {
				params: {
					dcu: this.dataForm.DCU,
					doorType: 1,
					stationSide: this.dataForm.stationSide,
				}
			}).then(res => {
				if (res.data.code == 0 && res.data.data !== null) {
					this.getData(res.data.data.dcuParametersDTO, res.data.data.sysDcuState)
					// 版本号
					this.baseForm.version = res.data.data.sysDcuState.version
				}
			})
		},
		//解析时间戳
		filterTime(time) {
			var date = new Date(time);//时间戳为10位需*1000，时间戳为13位的话不需乘1000
			var Y = date.getFullYear() + '-';
			var M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-';
			var D = date.getDate() + ' ';
			var h = date.getHours() + ':';
			var m = date.getMinutes() + ':';
			var s = date.getSeconds();
			return Y + M + D + h + m + s;
		},
		filterTime1(time) {
			var date = new Date(time);//时间戳为10位需*1000，时间戳为13位的话不需乘1000
			var Y = date.getFullYear() + '-';
			var M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-';
			var D = date.getDate() + ' ';
			var h = date.getHours() + ':';
			var m = date.getMinutes() + ':';
			var s = date.getSeconds();
			return h + m + s;
		},
		//获取基础参数
		getData(val, val1) {
			this.baseForm.leftNowel = val.leftNowel
			this.baseForm.closeTimeLeft = val.closeTimeLeft
			this.baseForm.openTimeLeft = val.openTimeLeft
			this.baseForm.slowCloseTimeLeft = val.slowCloseTimeLeft
			this.baseForm.slowOpenTimeLeft = val.slowOpenTimeLeft
			// this.baseForm.closeBrakeSpeedLeft = val.closeBrakeSpeedLeft
			// this.baseForm.openBrakeSpeedLeft = val.openBrakeSpeedLeft
			this.baseForm.closeImpactLeft = val.closeImpactLeft
			this.baseForm.openImpactLeft = val.openImpactLeft
			this.baseForm.encounterNowelLeft = val.encounterNowelLeft
			this.baseForm.encounterRegressionDistanceLeft = val.encounterRegressionDistanceLeft
			// this.baseForm.closeAccelerationLeft= val.closeAccelerationLeft
			// this.baseForm.openAccelerationLeft = val.openAccelerationLeft
			// this.baseForm.closeUniformSpeedLeft = val.closeUniformSpeedLeft
			// this.baseForm.openUniformSpeedLeft = val.openUniformSpeedLeft
			// this.baseForm.closeDeAcLeft = val.closeDeAcLeft
			// this.baseForm.openDeAcLeft = val.openDeAcLeft
			this.baseForm.closeEncounterNumLeft = val.closeEncounterNumLeft
			this.baseForm.openEncounterNumLeft = val.openEncounterNumLeft
			this.baseForm.closeEncounterTimeLeft = val.closeEncounterTimeLeft
			this.baseForm.openEncounterTimeLeft = val.openEncounterTimeLeft
			this.baseForm.buzzerVolumeLeft = val.buzzerVolumeLeft
			this.baseForm.lockTimeLeft = val.lockTimeLeft
			this.baseForm.macloseTimeLeft = val.macloseTimeLeft
			this.baseForm.year = val.year
			this.baseForm.overProThreLeft = val.overProThreLeft
			this.baseForm.month = val.month
			this.baseForm.dmWarnTimeLeft = val.dmWarnTimeLeft
			this.baseForm.day = val.day
			this.baseForm.checked = val.checked == 0 ? false : true

			this.baseForm.beforeUnlockTimeLeft = val.beforeUnlockTimeLeft
			this.baseForm.beforeCloseTimeLeft = val.beforeCloseTimeLeft
			this.baseForm.beforeOpenTimeLeft = val.beforeOpenTimeLeft
			this.baseForm.openNumLeft = val.openNumLeft
			this.baseForm.runningHourLeft = val.runningHourLeft
			this.baseForm.encounterNumLeft = val.encounterNumLeft
			this.baseForm.startNumLeft = val.startNumLeft
			this.baseForm.rightNowel = val.rightNowel
			this.baseForm.buzzerVolume = val1.buzzerVolume === '00' ? '1' : val1.buzzerVolume === '01' ? '2' : '3'
			if (this.type == 1) {
				this.baseForm.closeTimeRight = val.closeTimeRight
				this.baseForm.openTimeRight = val.openTimeRight
				this.baseForm.slowCloseTimeRight = val.slowCloseTimeRight
				this.baseForm.slowOpenTimeRight = val.slowOpenTimeRight
				// this.baseForm.closeBrakeSpeedRight = val.closeBrakeSpeedRight
				// this.baseForm.openBrakeSpeedRight = val.openBrakeSpeedRight
				this.baseForm.closeImpactRight = val.closeImpactRight
				this.baseForm.openImpactRight = val.openImpactRight
				this.baseForm.encounterNowelRight = val.encounterNowelRight
				this.baseForm.encounterRegressionDistanceRight = val.encounterRegressionDistanceRight
				// this.baseForm.closeAccelerationRight = val.closeAccelerationRight
				// this.baseForm.openAccelerationRight = val.openAccelerationRight
				// this.baseForm.closeUniformSpeedRight = val.closeUniformSpeedRight
				// this.baseForm.openUniformSpeedRight = val.openUniformSpeedRight
				// this.baseForm.closeDeAcRight = val.closeDeAcRight
				// this.baseForm.openDeAcRight = val.openDeAcRight
				this.baseForm.closeEncounterNumRight = val.closeEncounterNumRight
				this.baseForm.openEncounterNumRight = val.openEncounterNumRight
				this.baseForm.closeEncounterTimeRight = val.closeEncounterTimeRight
				this.baseForm.openEncounterTimeRight = val.openEncounterTimeRight
				this.baseForm.buzzerVolumeRight = val.buzzerVolumeRight
				this.baseForm.lockTimeRight = val.lockTimeRight
				this.baseForm.macloseTimeRigth = val.macloseTimeRigth
				this.baseForm.overProThreRight = val.overProThreRight
				this.baseForm.dmWarnTimeRight = val.dmWarnTimeRight

				this.baseForm.beforeUnlockTimeRight = val.beforeUnlockTimeRight
				this.baseForm.beforeCloseTimeRight = val.beforeCloseTimeRight
				this.baseForm.beforeOpenTimeRight = val.beforeOpenTimeRight
				this.baseForm.openNumRight = val.openNumRight
				this.baseForm.runningHourRight = val.runningHourRight
				this.baseForm.encounterNumRight = val.encounterNumRight
				this.baseForm.startNumRight = val.startNumRight
			}
		},
		// //获取历史保存的数据
		// getHistory(id) {
		// 	this.$http.get(`/psc/dcuparameters/${id}`).then(res => {
		// 		if (res.data.code == 0 && res.data.data !== null) {
		// 			this.getData(res.data.data)
		// 			//版本号
		// 		}
		// 	})
		// },
		initEcharts() {
			//获取横坐标
			// var a = (N - 1) * 5;
			// var max = N * 5
			// for (var i = a; i < max; i++) {
			// 	this.dataX[i] = (i * 0.05).toFixed(2)
			// }
			var myChart = this.$echarts.init(document.getElementById('baseEcharts'))
			const colorList = ["#F3D024FF", '#2062E6FF']
			var option = {
				backgroundColor: '#fff',
				legend: {
					icon: 'circle',
					top: '5%',
					right: '5%',
					itemWidth: 6,
					itemGap: 20,
					textStyle: {
						color: '#556677'
					}
				},
				tooltip: {
					trigger: 'axis',
					axisPointer: {
						label: {
							show: true,
							backgroundColor: '#fff',
							color: '#556677',
							borderColor: 'rgba(0,0,0,0)',
							shadowColor: 'rgba(0,0,0,0)',
							shadowOffsetY: 0
						},
						lineStyle: {
							width: 0
						}
					},
					backgroundColor: '#fff',
					textStyle: {
						color: '#5c6c7c'
					},
					padding: [10, 10],
					extraCssText: 'box-shadow: 1px 0 2px 0 rgba(163,163,163,0.5)'
				},
				grid: {
					top: '20%',
					left: '5%',
					right: '5%'
				},
				dataZoom: [{
					// 这个地方是控制下面的滑动条。
					show: true,
					realtime: true,
				},
				{
					type: 'inside',
					realtime: true,
					start: 0,
					end: 100,
					xAxisIndex: [0, 1],
				},
				],
				xAxis: [{
					type: 'category',
					data: this.dataX,
					axisLine: {
						lineStyle: {
							color: '#DCE2E8'
						}
					},
					axisTick: {
						show: false
					},
					axisLabel: {
						interval: 0,
						textStyle: {
							color: '#556677'
						},
						showMinLabel: true,
						showMaxLabel: true,
						// 默认x轴字体大小
						fontSize: 12,
						// margin:文字到x轴的距离
						margin: 15
					},
					axisPointer: {
						label: {
							// padding: [11, 5, 7],
							padding: [0, 0, 10, 0],
							margin: 15,
							fontSize: 12,
							backgroundColor: {
								type: 'linear',
								x: 0,
								y: 0,
								x2: 0,
								y2: 1,
								colorStops: [{
									offset: 0,
									color: '#fff' // 0% 处的颜色
								}, {
									offset: 0.86,
									color: '#fff' // 0% 处的颜色
								}, {
									offset: 0.86,
									color: '#33c0cd' // 0% 处的颜色
								}, {
									offset: 1,
									color: '#33c0cd' // 100% 处的颜色
								}],
								global: false // 缺省为 false
							}
						}
					},
					boundaryGap: false
				}],
				yAxis: [{
					type: 'value',
					axisTick: {
						show: false
					},
					axisLine: {
						show: true,
						lineStyle: {
							color: '#DCE2E8'
						}
					},
					axisLabel: {
						textStyle: {
							color: '#556677'
						}
					},
					splitLine: {
						show: false
					}
				}, {
					type: 'value',
					position: 'right',
					axisTick: {
						show: false
					},
					axisLabel: {
						textStyle: {
							color: '#556677'
						},
						formatter: '{value}'
					},
					axisLine: {
						show: true,
						lineStyle: {
							color: '#DCE2E8'
						}
					},
					splitLine: {
						show: false
					}
				}],
				series: [{
					name: '动能曲线',
					type: 'line',
					data: this.dataYD,
					symbolSize: 1,
					symbol: 'circle',
					smooth: true,
					yAxisIndex: 0,
					showSymbol: false,
					lineStyle: {
						width: 5,
						color: colorList[0]
					},
					itemStyle: {
						normal: {
							color: colorList[0],
							borderColor: colorList[0]
						}
					}
				}, {
					name: '速度曲线',
					type: 'line',
					data: this.dataY,
					symbolSize: 1,
					symbol: 'circle',
					smooth: true,
					yAxisIndex: 1,
					showSymbol: false,
					lineStyle: {
						width: 5,
						color: colorList[1]
					},
					itemStyle: {
						normal: {
							color: colorList[1],
							borderColor: colorList[1]
						}
					}
				}]
			};
			// option.dataZoom[0].startValue = this.dataX[a]
			// option.dataZoom[0].endValue = this.dataX[this.dataX.length - 1]
			myChart.setOption(option);
			window.addEventListener("resize", () => {
				myChart.resize();
			});
		},
		echarts() {
			this.$router.push({
				name: 'operEchart',
				query: {
					doorDcu: this.dataForm.DCU,
				}
			});
		},
		reset() {
			this.dataForm.DCU = this.DCUoptions[0].dcu
			this.init()
		}
	}
}
</script>

<style scoped>
.bg {
	background-color: #fff;
	border-radius: 10px;
	display: flex;
	align-items: center;
	height: 7.6vh;
	min-height: 76px;
	line-height: 7.6vh;
	padding: 0 1.8vw;
}

.bg>>>.el-form--inline .el-form-item__content,
.el-form--inline .el-form-item {
	vertical-align: middle !important;
}

.bg>>>.el-form-item {
	margin-bottom: 0;
}

.bg1 {
	background-color: #fff;
	border-radius: 10px;
	display: flex;
	align-items: center;
	/* height: 121.7vh; */
	/* height: 79vh; */
	/* min-height: 724px; */
	padding: 2.1vh 1.5vw;
	margin-top: 10px;
}

.homeTuTxt {
	width: 16px;
	font-size: 18px;
	font-weight: 400;
	word-wrap: break-word;
	word-break: normal;
	line-height: 40px;
	color: rgba(0, 65, 135, 1);
}

.bg1 .el-col {
	height: 100%;
}

.baseHeader {
	margin: 0;
	font-size: 18px;
	font-weight: 500;
	color: rgba(46, 48, 51, 1);
}

.baseInfo {
	display: flex;
	width: 100%;
	/* height: 78.1vh; */
	/* height: 50vh; */
	/* min-height: 484px; */
	padding: 10px 2.1vw;
	background: rgba(0, 123, 255, 0.1);
	border-radius: 10px;
	align-items: center;
	margin-top: 1.3vh;
}

.baseInfozd {
	/* height: 34.3vh; */
	/* height: 21vh; */
	/* min-height: 204px; */
}

.baseInfoContent {
	width: 100%;
	height: 100%;
	padding-left: 1.9vw;
}

.baseInfoContent>>>.el-row {
	display: flex;
	/* justify-content: space-between; */
}

.baseInfoContent>>>.el-input__inner {
	height: 100%;
	text-align: center;
}

.baseInfoContent>>>.el-form--inline .el-form-item__content,
.el-form--inline .el-form-item {
	vertical-align: middle !important;
}

.baseInfoContent>>>.el-form-item {
	margin-bottom: 0;
}

.baseInfoContent>>>.el-form {
	height: 100%;
	display: flex;
	flex-direction: column;
	justify-content: space-evenly;
}

.baseInfo1 {
	width: 50%;
	display: flex;
	justify-content: flex-start;
}

.baseInfo1>>>.el-form-item__label {
	/* width: 11vw; */
	width: 150px;
	font-size: 14px;
	font-weight: 400;
	color: rgba(46, 48, 51, 1);
}

.baseInfo2 {
	padding-left: 8vw;
}

.baseInfo2 div {
	width: 7.8vw;
	display: flex;
	justify-content: center;
}

.baseInfoBtn>>>.el-button--primary:focus,
.baseInfoBtn>>>.el-button--primary:hover {
	border-radius: 10px;

	background: rgba(25, 77, 138, 1) !important;
}

.baseInfoBtn>>>.el-button--primary {
	padding: 10px !important;
	border-radius: 10px;
	background: rgba(25, 77, 138, 1) !important;
	font-size: 16px;
	font-weight: 400;
	color: rgba(255, 255, 255, 1);
}

.baseInfoBtnAll {
	/* width: 95%; */
	width: 100%;
	justify-content: flex-end;
}

.danwei {
	font-size: 14px;
	font-weight: 400;
	color: rgba(46, 48, 51, 1);
	display: flex;
	align-items: center;
}

.baseInfoBtnRight {
	position: absolute;
	right: 1.8vw;
	top: 2vh;
	height: 96%;
	width: 7.8vw;
}

.baseInfoBtnRight .baseInfoBtn {
	display: flex;
	flex-direction: column;
	height: 100%;
	justify-content: space-evenly;
}

.baseInfoBtnRight>>>.baseInfoBtn1,
.PEDCBtn>>>.baseInfoBtn1 {
	background: rgba(42, 130, 228, 1) !important;
	border-color: rgba(42, 130, 228, 1) !important;
}

.baseInfoBtnRight>>>.baseInfoBtn1:focus,
.baseInfoBtnRight>>>.baseInfoBtn1:hover,
.PEDCBtn>>>.baseInfoBtn1:focus,
.PEDCBtn>>>.baseInfoBtn1:hover {
	background: rgba(42, 130, 228, 1) !important;
	border-color: rgba(42, 130, 228, 1) !important;
}

.baseInfoBtnRight>>>.baseInfoBtn2,
.PEDCBtn>>>.baseInfoBtn2 {
	background: rgba(255, 87, 51, 1) !important;
	border-color: rgba(255, 87, 51, 1) !important;
}

.baseInfoBtnRight>>>.baseInfoBtn2:focus,
.baseInfoBtnRight>>>.baseInfoBtn2:hover,
.PEDCBtn>>>.baseInfoBtn2:focus,
.PEDCBtn>>>.baseInfoBtn2:hover {
	background: rgba(255, 87, 51, 1) !important;
	border-color: rgba(255, 87, 51, 1) !important;
}

.baseInfoBtnRight>>>.baseInfoBtn3 {
	background: rgba(67, 207, 124, 1) !important;
	border-color: rgba(67, 207, 124, 1) !important;
}

.baseInfoBtnRight>>>.baseInfoBtn3:focus,
.baseInfoBtnRight>>>.baseInfoBtn3:hover {
	background: rgba(67, 207, 124, 1) !important;
	border-color: rgba(67, 207, 124, 1) !important;
}

.baseInfoBtnRight>>>.baseInfoBtn4 {
	background: rgba(56, 56, 56, 1) !important;
	border-color: rgba(56, 56, 56, 1) !important;
}

.baseInfoBtnRight>>>.baseInfoBtn4:focus,
.baseInfoBtnRight>>>.baseInfoBtn4:hover {
	background: rgba(56, 56, 56, 1) !important;
	border-color: rgba(56, 56, 56, 1) !important;
}

.baseInfoBtnRight>>>.baseInfoBtn5 {
	background: rgba(255, 141, 26, 1) !important;
	border-color: rgba(255, 141, 26, 1) !important;
}

.baseInfoBtnRight>>>.baseInfoBtn5:focus,
.baseInfoBtnRight>>>.baseInfoBtn5:hover {
	background: rgba(255, 141, 26, 1) !important;
	border-color: rgba(255, 141, 26, 1) !important;
}

.baseInfoBtnRight>>>.el-button {
	padding: 10px !important;
}

.bg2 {
	background-color: #fff;
	border-radius: 10px;
	padding: 2.1vh 1.5vw;
	margin-top: 10px;
	height: 38.1vh;
	min-height: 295px;
}

.bg3 {
	height: 24.5vh;
}

.bg3>>>.el-row {
	height: 100%;
}

.PEDCInfo {
	padding: 2vh 2.1vw 0;
	height: calc(100% - 23px);
	display: flex;
	align-items: center;
}

.PEDCBtn {
	display: flex;
}

.baseInfoEcharts {
	width: 100%;
	height: calc(100% - 23px);
}

.baseInfo1 .company {
	height: 2.7vh;
	line-height: 2.7vh;
	margin-top: 0.8vh;
	font-size: 14px;
}

.leftColor>>>.el-input__inner {
	color: #fff !important;
}
</style>
